import request from '@/utils/request'

//获取门店

export function shopDoorsList() {
  return request({
    url: '/shopDoors',
    method: 'get',
  })

}

//

export function updateShopDoor(updateForm) {
  return request({
    url: `/shopDoors/${updateForm._id}`,
    method: "put",
    data:updateForm
  })
}
//删除门店
export function deleteShopDoor(id) {
  return request({
    url: `/shopDoors/${id}`,
    method: "delete"
  })
}
//增加门店

export function addShopDoor(addForm) {
  // console.log(addForm, 999);
  return request({
    url: `/shopDoors`,
    method: "post",
    data: addForm
  })
}



export function updateShopDoorCommodity(payload) {
  return request({
    url: `/shopDoors/${payload._id}`,
    method: "put",
    data: payload
  })
}

